package com.tanami.rynmar;

import java.io.ByteArrayInputStream;
import java.io.InputStream;

import android.app.Fragment;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

public class ProductsListActivity extends Fragment {
		
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState	) {
		super.onCreateView(inflater, container, savedInstanceState);

		View view = inflater.inflate(R.layout.productlist1, container, false);
        		
       
        return view;
    }
	
	/*
	 * processProducts
	 * */
	public void processProducts(String productTag, byte[] xmlContent)
	{
		ByteArrayInputStream	in = new ByteArrayInputStream(xmlContent);
        InputStream				is = in;
        
        try
    	{
        	ProductList1ParsingTask parseTask = new ProductList1ParsingTask(this, productTag);
	    	
	    	parseTask.execute(is);
    	}
    	catch(Exception e)
    	{
    		Log.e("processProducts", "general error", e);
    	}	         		
	}
    
    /*
     * OnParseComplete
     * */
    public void OnParseComplete(InputStream is, PriceListXmlContent data)
    {
    	Log.i("ProductsListActivity", "aaa");
    }
}